package com.ims.core.doc.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ims.common.annotation.Excel;
import com.ims.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 销售单对象 t_sal_order
 *
 * @author IMS
 * @date 2024-12-02
 */
public class TSalOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 订单ID
     */
    @Excel(name = "订单ID")
    private String orderId;

    /**
     * 公司代码
     */
    @Excel(name = "公司代码")
    private String custId;

    /**
     * 客户公司代码
     */
    @Excel(name = "客户公司代码")
    private String siteCode;

    /**
     * 客户公司
     */
    @Excel(name = "客户公司")
    private String siteName;

    /**
     * 订单号
     */
    @Excel(name = "订单号")
    private String orderNo;

    /**
     * 客户编码
     */
    @Excel(name = "客户编码")
    private String buyerCode;

    /**
     * 客户名称
     */
    @Excel(name = "客户名称")
    private String buyerName;

    /**
     * 账单条款代码
     */
    @Excel(name = "账单条款代码")
    private String termsCode;

    /**
     * 账单条款
     */
    @Excel(name = "账单条款")
    private String termsName;

    /**
     * 订单类型代码
     */
    @Excel(name = "订单类型代码")
    private String  orderType;

    /**
     * 订单类型
     */
    @Excel(name = "订单类型")
    private String orderTypeName;

    /**
     * 订单状态代码
     */
    @Excel(name = "订单状态代码")
    private String orderStatus;

    /**
     * 订单状态
     */
    @Excel(name = "订单状态")
    private String orderStatusName;

    /**
     * 订单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderDate;

    /**
     * 采购单号
     */
    @Excel(name = "采购单号")
    private String poNo;

    /**
     * 销售员
     */
    @Excel(name = "销售员")
    private String saleName;

    /**
     * 是否含税代码
     */
    @Excel(name = "是否含税代码")
    private Integer isTax;

    /**
     * 是否含税
     */
    @Excel(name = "是否含税")
    private String isTaxName;

    /**
     * 联系人
     */
    @Excel(name = "联系人")
    private String contractName;

    /**
     * 币别代码
     */
    @Excel(name = "币别代码")
    private String currencyCode;

    /**
     * 币别
     */
    @Excel(name = "币别")
    private String currencyName;

    /**
     * 税码
     */
    @Excel(name = "税码")
    private String taxCode;

    /**
     * 税率
     */
    @Excel(name = "税率")
    private String taxRate;

    /**
     * 总价
     */
    @Excel(name = "总价")
    private BigDecimal totalAmount;

    /**
     * ERP发票流水号
     */
    @Excel(name = "ERP发票流水号")
    private String erpSerialNumber;

    /**
     * 销售单明细信息
     */
    private List<TSalOrderEntry> tSalOrderEntryList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getCustId() {
        return custId;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    public String getSiteCode() {
        return siteCode;
    }

    public void setSiteCode(String siteCode) {
        this.siteCode = siteCode;
    }

    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getBuyerCode() {
        return buyerCode;
    }

    public void setBuyerCode(String buyerCode) {
        this.buyerCode = buyerCode;
    }

    public String getBuyerName() {
        return buyerName;
    }

    public void setBuyerName(String buyerName) {
        this.buyerName = buyerName;
    }

    public String getTermsCode() {
        return termsCode;
    }

    public void setTermsCode(String termsCode) {
        this.termsCode = termsCode;
    }

    public String getTermsName() {
        return termsName;
    }

    public void setTermsName(String termsName) {
        this.termsName = termsName;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getOrderTypeName() {
        return orderTypeName;
    }

    public void setOrderTypeName(String orderTypeName) {
        this.orderTypeName = orderTypeName;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatusName() {
        return orderStatusName;
    }

    public void setOrderStatusName(String orderStatusName) {
        this.orderStatusName = orderStatusName;
    }

    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public String getPoNo() {
        return poNo;
    }

    public void setPoNo(String poNo) {
        this.poNo = poNo;
    }

    public String getSaleName() {
        return saleName;
    }

    public void setSaleName(String saleName) {
        this.saleName = saleName;
    }

    public Integer getIsTax() {
        return isTax;
    }

    public void setIsTax(Integer isTax) {
        this.isTax = isTax;
    }

    public String getIsTaxName() {
        return isTaxName;
    }

    public void setIsTaxName(String isTaxName) {
        this.isTaxName = isTaxName;
    }

    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    public String getCurrencyCode() {
        return currencyCode;
    }

    public void setCurrencyCode(String currencyCode) {
        this.currencyCode = currencyCode;
    }

    public String getCurrencyName() {
        return currencyName;
    }

    public void setCurrencyName(String currencyName) {
        this.currencyName = currencyName;
    }

    public String getTaxCode() {
        return taxCode;
    }

    public void setTaxCode(String taxCode) {
        this.taxCode = taxCode;
    }

    public String getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(String taxRate) {
        this.taxRate = taxRate;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getErpSerialNumber() {
        return erpSerialNumber;
    }

    public void setErpSerialNumber(String erpSerialNumber) {
        this.erpSerialNumber = erpSerialNumber;
    }

    public List<TSalOrderEntry> getTSalOrderEntryList() {
        return tSalOrderEntryList;
    }

    public void setTSalOrderEntryList(List<TSalOrderEntry> tSalOrderEntryList) {
        this.tSalOrderEntryList = tSalOrderEntryList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("orderId", getOrderId())
                .append("custId", getCustId())
                .append("siteCode", getSiteCode())
                .append("siteName", getSiteName())
                .append("orderNo", getOrderNo())
                .append("buyerCode", getBuyerCode())
                .append("buyerName", getBuyerName())
                .append("termsCode", getTermsCode())
                .append("termsName", getTermsName())
                .append("orderType", getOrderType())
                .append("orderTypeName", getOrderTypeName())
                .append("orderStatus", getOrderStatus())
                .append("orderStatusName", getOrderStatusName())
                .append("orderDate", getOrderDate())
                .append("poNo", getPoNo())
                .append("saleName", getSaleName())
                .append("isTax", getIsTax())
                .append("isTaxName", getIsTaxName())
                .append("contractName", getContractName())
                .append("currencyCode", getCurrencyCode())
                .append("currencyName", getCurrencyName())
                .append("taxCode", getTaxCode())
                .append("taxRate", getTaxRate())
                .append("totalAmount", getTotalAmount())
                .append("remark", getRemark())
                .append("erpSerialNumber", getErpSerialNumber())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("tSalOrderEntryList", getTSalOrderEntryList())
                .toString();
    }
}
